﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Base_TempRelation数据模型对象
    /// </summary>
    [Serializable]
    public partial class Base_TempRelationMod
    {
        /// <summary>
        /// 初始化Base_TempRelation数据模型对象
        /// </summary>
        public Base_TempRelationMod()
        {
            
        }
        /// <summary>
        /// 初始化Base_TempRelation数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="maxT">MaxT</param>
        /// <param name="minT">MinT</param>
        /// <param name="maxR">MaxR</param>
        /// <param name="minR">MinR</param>
        public Base_TempRelationMod(int iD,int maxT,int minT,decimal maxR,decimal minR)
        {
            //给ID字段赋值
            this.ID = iD;
            //给MaxT字段赋值
            this.MaxT = maxT;
            //给MinT字段赋值
            this.MinT = minT;
            //给MaxR字段赋值
            this.MaxR = maxR;
            //给MinR字段赋值
            this.MinR = minR;
        }
        
		//属性存储数据的变量
        private int _iD;
        private int _maxT;
        private int _minT;
        private decimal _maxR;
        private decimal _minR;
        
        /// <summary>
        /// ID
        /// </summary>
        public int ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// MaxT
        /// </summary>
        public int MaxT
        {
            get { return this._maxT; }
            set { this._maxT = value; }
        }
        /// <summary>
        /// MinT
        /// </summary>
        public int MinT
        {
            get { return this._minT; }
            set { this._minT = value; }
        }
        /// <summary>
        /// MaxR
        /// </summary>
        public decimal MaxR
        {
            get { return this._maxR; }
            set { this._maxR = value; }
        }
        /// <summary>
        /// MinR
        /// </summary>
        public decimal MinR
        {
            get { return this._minR; }
            set { this._minR = value; }
        }
        
        /// <summary>
        /// 对比两个Base_TempRelation数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Base_TempRelation数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Base_TempRelation数据模型对象
            Base_TempRelationMod base_TempRelationMod = obj as Base_TempRelationMod;
            //判断是否转换成功
            if (base_TempRelationMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == base_TempRelationMod.ID &&
                //判断MaxT是否一致
                this.MaxT == base_TempRelationMod.MaxT &&
                //判断MinT是否一致
                this.MinT == base_TempRelationMod.MinT &&
                //判断MaxR是否一致
                this.MaxR == base_TempRelationMod.MaxR &&
                //判断MinR是否一致
                this.MinR == base_TempRelationMod.MinR;
        }
        /// <summary>
        /// 将当前Base_TempRelation数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Base_TempRelation数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将MaxT进行按位异或运算处理
                this.MaxT.GetHashCode() ^
                //将MinT进行按位异或运算处理
                this.MinT.GetHashCode() ^
                //将MaxR进行按位异或运算处理
                this.MaxR.GetHashCode() ^
                //将MinR进行按位异或运算处理
                this.MinR.GetHashCode();
        }
        /// <summary>
        /// 将当前Base_TempRelation数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Base_TempRelation数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将MaxT转换成字符串
                this.MaxT + "," +
                //将MinT转换成字符串
                this.MinT + "," +
                //将MaxR转换成字符串
                this.MaxR + "," +
                //将MinR转换成字符串
                this.MinR +
                "]";
        }
    }
}
